package c570a1

class BookController {
	def scaffold = true
	def bookService
	def ajaxRandom = {
		def randomBook = bookService.getRandomBook()
		render (view:"bookBody", model: [aBook:randomBook])
	}
	def random = {
		def randomBook = bookService.getRandomBook()
		[aBook : randomBook]
	}
	
	def index = {redirect (action:random)}
//	def home= {render <h1>hey you</h1>}
}
